<script src="<?php echo base_url();?>js/knockout-1.2.1.js"></script>
<p>&nbsp;</p>
<div align="center">
  <h1>Raw Material Inspection Report (Incoming)</h1>
</div>
<table width="60%" border="0" align="center" cellpadding="0" cellspacing="0" class="font">
  <tr>
    <td width="12%" height="30">Date</td>
    <td width="27%" height="30"> :    
    <input id="datepicker" data-bind="value: departure" /></td>
    <td width="18%" height="30">Lot no.</td>
    <td width="43%" height="30"> :    
    <input name="textfield18" type="text" class="k-textbox" id="textfield18"/></td>
  </tr>
  <tr>
    <td height="30">Type</td>
    <td height="30"> :    
      <select name="ticket4" class="select" id="ticket1">
        <option value="PCC Incoming">PCC Incoming</option>
        <option value="GCC Incoming">GCC Incoming</option>
        <option value="Calcium Chloride">Calcium Chloride</option>
    </select></td>
    <td height="30">Grade</td>
    <td height="30"> :    
      <select name="ticket2" class="select" id="ticket3">
        <option value="A">A</option>
        <option value="H">H</option>
        <option value="R">R</option>
    </select></td>
  </tr>
  <tr>
    <td height="30">Brand</td>
    <td height="30"> : 
      <select name="ticket5" class="select" id="ticket2">
        <option value="Hydrofill 75">Hydrofill 75</option>
        <option value="FMT 75 LD">FMT 75 LD</option>
        <option value="ALBACAR LO">ALBACAR LO</option>
    </select></td>
    <td height="30">Problem</td>
    <td height="30"> :    
    <input name="textfield21" type="text" class="k-textbox" id="textfield21"/></td>
  </tr>
</table>
<br />
<table width="60%" align="center">
<tr>
<td>
<div align="right">
<input name="Submit" type="submit" class="k-button" value="บันทึกข้อมูล"/>
&nbsp;
<input name="Reset" type="submit" class="k-button" value="ยกเลิก"/>
</div>
</td>
</tr>
</table>
<table width="60%" align="center" class="font">
  <tr>
    <td>
     <table id="grid">
                <thead>
                    <tr>
                        <th data-field="Properties">Properties Item</th>
                        <th data-field="Value">Value</th>
                        <th data-field="Unit">Unit</th>
                    </tr>
                </thead>
                <tbody>
<tr>
<td>Brightnesss</td><td><input name="textfield4" type="number" class="k-textbox number" id="textfield2"/></td><td>%</td>
</tr>
<tr>
<td>Solid Content</td><td><input name="textfield5" type="number" class="k-textbox number" id="textfield4"/></td>
<td>%</td>
</tr>
<tr>
<td>pH</td><td><input name="textfield6" type="number" class="k-textbox number" id="textfield5"/></td><td>&nbsp;</td>
</tr>
<tr>
<td>Residue</td><td><input name="textfield7" type="number" class="k-textbox number" id="textfield6"/></td><td>ppm or (%)</td>
</tr>
<tr>
<td>Viscosity</td><td><input name="textfield8" type="number" class="k-textbox number" id="textfield7"/></td><td>(cPs.</td>
</tr>
<tr>
<td>Dirt Size ≥ 0.04mm2</td><td><input name="textfield9" type="number" class="k-textbox number" id="textfield8"/></td><td>(mm<sup>2</sup>)</td>
</tr>
<tr>
<td>Conductivity</td><td><input name="textfield10" type="number" class="k-textbox number" id="textfield9"/></td>
<td>(μS/cm)</td>
</tr>
<tr>
<td>Density</td><td><input name="textfield10" type="number" class="k-textbox number" id="textfield9"/></td><td>(g/cm<sup>3</sup>)</td>
</tr>
<tr>
<td>Free Lime</td><td><input name="textfield10" type="number" class="k-textbox number" id="textfield9"/></td><td>(%)</td>
</tr>
<tr>
<td>Particle size SMT</td><td><input name="textfield10" type="number" class="k-textbox number" id="textfield9"/></td><td>(μm)</td>
</tr>
<tr>
<td>Particle size PPPC</td><td><input name="textfield10" type="number" class="k-textbox number" id="textfield9"/></td><td>(μm)</td>
</tr>
<tr>
<td>Calcuim Hardness( as Ca )</td><td><input name="textfield10" type="number" class="k-textbox number" id="textfield9"/></td><td>(%)</td>
</tr>

                </tbody>
      </table>

            <script>
                $(document).ready(function() {
                    $("#grid").kendoGrid({
						columns: [
						{ field: "Properties", width: "125px" },
						{ field: "Value", width: "20px" },
						{ field: "Unit",  width: "40px" }
						],
                        //height: 1000,
						//pageable: true,
						dataSource: {
						//pageSize: 12
						} 
                    });
                });
            </script>
    </td>
  </tr>
</table>

            <!--scrip list select-->
<script>
                $(document).ready(function() {
                    var viewModel = {
                        chosenTicket: ko.observable(),
                        resetTicket: function() { this.chosenTicket(null) },
                    };
                    $("#ticket1").kendoDropDownList().trigger("change");
                    $("#ticket2").kendoDropDownList().trigger("change");
                    $("#ticket3").kendoDropDownList().trigger("change");
                });
      		</script>
            <!--scrip วัน-เดือน-ปี-->
<script>
                $(document).ready(function() {
                    var today = new Date(),
                        birthdays = [
                           +new Date(today.getFullYear(), today.getMonth(), 11),
                           +new Date(today.getFullYear(), today.getMonth() + 1, 6),
                           +new Date(today.getFullYear(), today.getMonth() + 1, 27),
                           +new Date(today.getFullYear(), today.getMonth() - 1, 3),
                           +new Date(today.getFullYear(), today.getMonth() - 2, 22)
                        ];

                    $("#datepicker").kendoDatePicker({
                        value: today,
                        month: {
                            // template for dates in month view
                            content: '# if ($.inArray(+data.date, [' + birthdays + ']) != -1) { #' +
                                         '<div class="birthday"></div>' +
                                     '# } #' +
                                     '#= data.value #'
                        },
                        footer: "Today - #=kendo.toString(data, 'd') #"
                    });

                    $("#datepicker").data("kendoDatePicker")
                                    .dateView.calendar.element
                                    .width(300);
                });
            </script>
            <!--scrip เวลา-->
<script>
                $(document).ready(function() {
                    // create TimePicker from input HTML element
                    $("#timepicker").kendoTimePicker();
                });
            </script>